Layout DXL and traceability Matrix

Hello,

My project has just determine to combine several projects together and tag individual requirements, either as Both, FQ, or FJS the following code is to create the req. id along with filter base on the individula project. The question I have is how would you modified the existing code from the DXL wizard to allow the correct prefix based on the view(Project) I was trying to create the new prefix attr and module names at the module level. Is there a way of accessing this information through the traceability matrix I can produce what I trying to do; if I have all attributes at the object level I am able to get the functionality I am looking for but I am trying to keep these attr at the Module level so we would only need to fill in the data once. Is this even posssible through Layout DXL?

Thank you.

-Jim
 

Layout DXL Column:
string Prefix = probeAttr_(current, "FJS_Prefix") "-" probeAttr_(obj, "Absolute Number")
displayRich Prefix
 
Filter: Project != FJS
 
Layout DXL Column:
string Prefix = probeAttr_(current, "FQ_Prefix") "-" probeAttr_(obj, "Absolute Number")
displayRich Prefix
 
Filter: Project != FQ
 
 
Traceablity Matrix
// DXL generated by DOORS traceability wizard on 02 February 2012.
// Wizard version 2.0, DOORS version 9.3.0.0
pragma runLim, 0
int lines[1] = {0}
void adjustLines(int depth, showAtDepth) {
    int count
    for (count = 0; count < 1; count++) {
        while (lines[depth-1] < lines[count]) {
            if (depth == showAtDepth) displayRich("\\pard " " ")
            lines[depth-1]++
        }
    }
}
void showOut(Object o, int depth) {
    Link l
    LinkRef lr
    ModName_ otherMod = null
    Module linkMod = null
    ModuleVersion otherVersion = null
    Object othero
    string disp = null
    string s = null
    string plain, plainDisp
    int plainTextLen
    int count
    bool doneOne = false
    string linkModName = "*"
    for l in all(o->linkModName) do {
        otherVersion = targetVersion l
        otherMod = module(otherVersion)
        if (null otherMod || isDeleted otherMod) continue
        othero = target l
        if (null othero) {
            load(otherVersion,false)
        }
        othero = target l
        if (null othero) continue
        if (isDeleted othero) continue
        int oldLines = lines[depth-1]
        adjustLines(depth, 1)
        bool kick = (doneOne) && (lines[depth-1] == oldLines)
        if (kick) {
            lines[depth-1]++
            if (depth == 1) displayRich("\\pard " " ")
        }
        if (depth < 1) {
            showOut(othero, depth+1)
        }
        doneOne = true
        if (depth == 1) {
            s = name(otherMod)
            if (isBaseline(otherVersion)) {
                s = s " [" versionString(otherVersion) "]"
            }
            if (s == "") 
            displayRich("\\pard " " ")
            else
            displayRich("\\pard " s)
        //Modified code
                //I would like to have the "Project" attr to be at the module level rather than object level "probeRichAttr_(othero,"Project", false)"
                //Is this even possible??????
            s = probeRichAttr_(othero,"Project", false) "-" probeRichAttr_(othero,"Absolute Number", true)
            if (s == "") 
            displayRich("\\pard " " ")
            else
            displayRich("\\pard " s)
            s = probeRichAttr_(othero,"Object Text", true)
            if (s == "") 
            displayRich("\\pard " " ")
            else
            displayRich("\\pard " s)
        }
        lines[depth-1] += 3
    }
    if (depth == 1) {
        ExternalLink extLink
        doneOne = false
        for extLink in o->"" do {
            if (!doneOne) {
                displayRich("\\pard " "{\\b External Links:}")
                doneOne = true
            }
        }
    }
}
showOut(obj,1)

SystemAdmin - Thu Feb 02 23:32:57 EST 2012

Re: Layout DXL and traceability Matrix
llandale - Fri Feb 03 10:12:36 EST 2012

So you have had two almost identical projects and you want to avoid keeping them as identical as possible; when a general requirement changes you want to change it once. So you decide to have just a single project, where most requirements apply to "both" but may only apply to one. When making layouts and reports for one project, you want the "Requirement ID" to refect the name of that project.

I see you have these 3 Module level attributes in your modules:

Name            Sample Value    Notes
"Prefix"      "Sys_"        system attribute
"FQ_Prefix"   "FQ-" custom
"FJS_Prefix"  "FJS-"        custom


You seem to have some sort of object-level "IsRequirement" attribute with perhaps these enumerations multiple selectable:

 

  • FQ
  • FJS


An object is a requirement for a project when that project's enumeration is selected.

So when you load "FQ View" you want only those requirements that apply to both or to FQ to display, and you want a layout in that view to know to display "FQ-Sys_absno" IDs. Your problem is getting the layout to "know" the intended target of the view.

Its does not seem reasonable to have a module level attribute "Project" since its value is dependant on the view.

It seems to me this will work: By convention, a project-sensitive view must have the name of that project as the first word of the view e.g. two views "FQ Allocation View" and identical "FJS Allocation View". The layout gets the name of the "current" view and determines which prefix to use based on the name. Your layouts have this at the top:

 

 

  • Module mod = current
  • string NameView = currentView()
  • string ProjPrefix
  • if (NameView0:1 == "FQ") then ProjPrefix = probeAttr(mod, "FQ_Prefix")
  • elseif(NameView0:2 == "FFS") then ProjPrefix = probeAttr(mod, "FJS_Prefix")
  • else ProjPrefix = ""


Down inside your layout:

 

 

  • s = ProjPrefix identifier(othero)


Seems like you don't need the two module level Attributes, just look for "FQ" and hardcode prefix "FQ-"

Views that do filtering, e.g. "FQ UnAllocated View" that shows just those requirements for FQ that have not yet been allocated. The filter says "if IsRequirement includes FQ ...and... the allocation attribute is incomplete"

-Louie

 

Re: Layout DXL and traceability Matrix
SystemAdmin - Sat Feb 04 00:09:53 EST 2012

llandale - Fri Feb 03 10:12:36 EST 2012

So you have had two almost identical projects and you want to avoid keeping them as identical as possible; when a general requirement changes you want to change it once. So you decide to have just a single project, where most requirements apply to "both" but may only apply to one. When making layouts and reports for one project, you want the "Requirement ID" to refect the name of that project.

I see you have these 3 Module level attributes in your modules:

Name            Sample Value    Notes
"Prefix"      "Sys_"        system attribute
"FQ_Prefix"   "FQ-" custom
"FJS_Prefix"  "FJS-"        custom


You seem to have some sort of object-level "IsRequirement" attribute with perhaps these enumerations multiple selectable:

 

  • FQ
  • FJS


An object is a requirement for a project when that project's enumeration is selected.

So when you load "FQ View" you want only those requirements that apply to both or to FQ to display, and you want a layout in that view to know to display "FQ-Sys_absno" IDs. Your problem is getting the layout to "know" the intended target of the view.

Its does not seem reasonable to have a module level attribute "Project" since its value is dependant on the view.

It seems to me this will work: By convention, a project-sensitive view must have the name of that project as the first word of the view e.g. two views "FQ Allocation View" and identical "FJS Allocation View". The layout gets the name of the "current" view and determines which prefix to use based on the name. Your layouts have this at the top:

 

 

  • Module mod = current
  • string NameView = currentView()
  • string ProjPrefix
  • if (NameView0:1 == "FQ") then ProjPrefix = probeAttr(mod, "FQ_Prefix")
  • elseif(NameView0:2 == "FFS") then ProjPrefix = probeAttr(mod, "FJS_Prefix")
  • else ProjPrefix = ""


Down inside your layout:

 

 

  • s = ProjPrefix identifier(othero)


Seems like you don't need the two module level Attributes, just look for "FQ" and hardcode prefix "FQ-"

Views that do filtering, e.g. "FQ UnAllocated View" that shows just those requirements for FQ that have not yet been allocated. The filter says "if IsRequirement includes FQ ...and... the allocation attribute is incomplete"

-Louie

 

Thank you the reply.

I understand what you are saying but its not quite what I am trying to do. Currently we have two different names for the same Module depending on the project I would like to have a Layout DXl column to produce the trace matrix. I would like it to be a dynamically changing column so that the prefix is fixed accordingly. Currently we use the Modules name as the Prefix. So that is why I am trying to store that iformation at the Module level rather than the object level. Is it possible to get the Module level attr values using a Layout DXL column?

Thank you,
Jim

Re: Layout DXL and traceability Matrix
SystemAdmin - Sat Feb 04 01:05:27 EST 2012

SystemAdmin - Sat Feb 04 00:09:53 EST 2012
Thank you the reply.

I understand what you are saying but its not quite what I am trying to do. Currently we have two different names for the same Module depending on the project I would like to have a Layout DXl column to produce the trace matrix. I would like it to be a dynamically changing column so that the prefix is fixed accordingly. Currently we use the Modules name as the Prefix. So that is why I am trying to store that iformation at the Module level rather than the object level. Is it possible to get the Module level attr values using a Layout DXL column?

Thank you,
Jim

Thank you.

I believe I found the solution to dynamicaly modifying the trace view by which project view is choosen.

so far this what I have. I am going to have the Module name as the Company's internal name then create two module level attr for the project names along with module level prefix attr and create a view using different versions of the following code based on what project view is choosen. Is there any thing I should modify in my logic of implemeting this live?

Thank you,
Jim
 

// DXL generated by DOORS traceability wizard on 04 February 2012.
// Wizard version 2.0, DOORS version 9.3.0.4
pragma runLim, 0
int lines[1] = {0}
void adjustLines(int depth, showAtDepth) {
    int count
    for (count = 0; count < 1; count++) {
        while (lines[depth-1] < lines[count]) {
            if (depth == showAtDepth) displayRich("\\pard " " ")
            lines[depth-1]++
        }
    }
}
void showOut(Object o, int depth) {
    Link l
    LinkRef lr
    ModName_ otherMod = null
    Module linkMod = null
    ModuleVersion otherVersion = null
    Object othero
    string disp = null
    string s = null
    string plain, plainDisp
    int plainTextLen
    int count
    bool doneOne = false
    string linkModName = "*"
    for l in all(o->linkModName) do {
        otherVersion = targetVersion l
        otherMod = module(otherVersion)
        if (null otherMod || isDeleted otherMod) continue
        othero = target l
        if (null othero) {
            load(otherVersion,false)
        }
        othero = target l
        if (null othero) continue
        if (isDeleted othero) continue
        int oldLines = lines[depth-1]
        adjustLines(depth, 1)
        bool kick = (doneOne) && (lines[depth-1] == oldLines)
        if (kick) {
            lines[depth-1]++
            if (depth == 1) displayRich("\\pard " " ")
        }
        if (depth < 1) {
            showOut(othero, depth+1)
        }
        doneOne = true
        if (depth == 1) {
            // Modified.....
                s = probeRichAttr_(module(othero),"FJS_name", true)
                        //
            if (isBaseline(otherVersion)) {
                s = s " [" versionString(otherVersion) "]"
            }
            if (s == "") 
            displayRich("\\pard " " ")
            else
            displayRich("\\pard " s)
                        // Modified.....
                        s = probeRichAttr_(module(othero),"FJS_Prefix", true) probeRichAttr_(othero,"Absolute Number", true)
            //
            if (s == "") 
            displayRich("\\pard " " ")
            else
            displayRich("\\pard " s)
            s = probeRichAttr_(othero,"Object Text", true)
            if (s == "") 
            displayRich("\\pard " " ")
            else
            displayRich("\\pard " s)
        }
        lines[depth-1] += 3
    }
    if (depth == 1) {
        ExternalLink extLink
        doneOne = false
        for extLink in o->"" do {
            if (!doneOne) {
                displayRich("\\pard " "{\\b External Links:}")
                doneOne = true
            }
        }
    }
}
showOut(obj,1)

Re: Layout DXL and traceability Matrix
llandale - Mon Feb 06 15:00:17 EST 2012

SystemAdmin - Sat Feb 04 00:09:53 EST 2012
Thank you the reply.

I understand what you are saying but its not quite what I am trying to do. Currently we have two different names for the same Module depending on the project I would like to have a Layout DXl column to produce the trace matrix. I would like it to be a dynamically changing column so that the prefix is fixed accordingly. Currently we use the Modules name as the Prefix. So that is why I am trying to store that iformation at the Module level rather than the object level. Is it possible to get the Module level attr values using a Layout DXL column?

Thank you,
Jim

Is it possible to get the Module level attr values using a Layout DXL column?

Sure. Down when you find "othero":

Module otherm = module(othero)
s = otherm."NameModuleLevelAttribute"

-Louie